package com.cmc.cloud.cmclink.doc.convert;

import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcargocntr.ManifestCargoCntrCreateReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcargocntr.ManifestCargoCntrRespVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcargocntr.ManifestCargoCntrUpdateReqVO;
import com.cmc.cloud.cmclink.doc.entity.ManifestCargoCntrDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 舱单货物箱关联 Convert
 *
 * @author chenzheng
 */
@Mapper
public interface ManifestCargoCntrConvert {
    /**
     * 获取转换接口的实例
     */
    ManifestCargoCntrConvert INSTANCE = Mappers.getMapper(ManifestCargoCntrConvert.class);

    /**
     * 将创建请求VO转换为DO
     *
     * @param bean 创建请求VO
     * @return DO
     */
    ManifestCargoCntrDO convert(ManifestCargoCntrCreateReqVO bean);

    /**
     * 将更新请求VO转换为DO
     *
     * @param bean 更新请求VO
     * @return DO
     */
    ManifestCargoCntrDO convert(ManifestCargoCntrUpdateReqVO bean);

    /**
     * 将更新请求VO转换为DO
     *
     * @param bean 更新请求VO
     * @return DO
     */
    List<ManifestCargoCntrDO> convertUpdateList(List<ManifestCargoCntrUpdateReqVO> bean);

    /**
     * 将更新请求VO转换为DO
     *
     * @param bean 更新请求VO
     * @return DO
     */
    List<ManifestCargoCntrDO> convertRespList(List<ManifestCargoCntrRespVO> bean);

    /**
     * 将DO转换为查询响应VO
     *
     * @param bean DO
     * @return VO
     */
    ManifestCargoCntrRespVO convert(ManifestCargoCntrDO bean);

    /**
     * 将DO列表转换为查询响应VO列表
     *
     * @param list DO列表
     * @return VO List
     */
    List<ManifestCargoCntrRespVO> convertList(List<ManifestCargoCntrDO> list);

}
